import { Component } from '@angular/core';

import { LiveCatService } from './live.cat.service';

import { LiveBase } from '../live.base';

import { Util } from '../../../utils/util';

@Component({
  selector: 'live-cat',
  templateUrl: './live.cat.html',
  styles: [`

  `],
  providers: [LiveCatService]
})

export class LiveCatComponent extends LiveBase {

  liver: any;

  constructor(public service: LiveCatService, private util: Util) {

    super(service);

    this.liver = this.util.sessionStore().get('liveDetail');

    this.param.darenId = this.liver.darenId;

    this.getHttp(this.param);
  }

  getHttp(param) {
    var res = {"code":0,"msg":"成功","data":[{"id":"-30210825465886\u0001263817957","date":"2017-11-22 00:00:00","categoryId":-30210825465886,"categoryName":"女装/男装/内衣--女装/女士精品--裤子","categoryLevel":3,"darenId":263817957,"sellAmount7Days":0,"sellMoney7Days":0.0,"productNum7Days":0,"sellAmount30Days":44,"sellMoney30Days":4224.0,"productNum30Days":1,"viewCount7Days":0,"praiseCount7Days":0,"viewCount30Days":22934,"viewPraiseCount30Days":23269},{"id":"162103\u0001263817957","date":"2017-11-22 00:00:00","categoryId":162103,"categoryName":"女装/男装/内衣--女装/女士精品--毛衣","categoryLevel":3,"darenId":263817957,"sellAmount7Days":0,"sellMoney7Days":0.0,"productNum7Days":0,"sellAmount30Days":1772,"sellMoney30Days":229008.0,"productNum30Days":5,"viewCount7Days":0,"praiseCount7Days":0,"viewCount30Days":123559,"viewPraiseCount30Days":662156},{"id":"162205\u0001263817957","date":"2017-11-22 00:00:00","categoryId":162205,"categoryName":"女装/男装/内衣--女装/女士精品--牛仔裤","categoryLevel":3,"darenId":263817957,"sellAmount7Days":0,"sellMoney7Days":0.0,"productNum7Days":0,"sellAmount30Days":945,"sellMoney30Days":110790.0,"productNum30Days":5,"viewCount7Days":0,"praiseCount7Days":0,"viewCount30Days":202740,"viewPraiseCount30Days":1955227},{"id":"1623\u0001263817957","date":"2017-11-22 00:00:00","categoryId":1623,"categoryName":"女装/男装/内衣--女装/女士精品--半身裙","categoryLevel":3,"darenId":263817957,"sellAmount7Days":0,"sellMoney7Days":0.0,"productNum7Days":0,"sellAmount30Days":1217,"sellMoney30Days":121242.0,"productNum30Days":3,"viewCount7Days":0,"praiseCount7Days":0,"viewCount30Days":98239,"viewPraiseCount30Days":629843},{"id":"50000697\u0001263817957","date":"2017-11-22 00:00:00","categoryId":50000697,"categoryName":"女装/男装/内衣--女装/女士精品--毛针织衫","categoryLevel":3,"darenId":263817957,"sellAmount7Days":0,"sellMoney7Days":0.0,"productNum7Days":0,"sellAmount30Days":3532,"sellMoney30Days":492059.0,"productNum30Days":13,"viewCount7Days":0,"praiseCount7Days":0,"viewCount30Days":185928,"viewPraiseCount30Days":797412},{"id":"50008898\u0001263817957","date":"2017-11-22 00:00:00","categoryId":50008898,"categoryName":"女装/男装/内衣--女装/女士精品--卫衣/绒衫","categoryLevel":3,"darenId":263817957,"sellAmount7Days":0,"sellMoney7Days":0.0,"productNum7Days":0,"sellAmount30Days":1369,"sellMoney30Days":137575.0,"productNum30Days":4,"viewCount7Days":0,"praiseCount7Days":0,"viewCount30Days":135231,"viewPraiseCount30Days":752190},{"id":"50008899\u0001263817957","date":"2017-11-22 00:00:00","categoryId":50008899,"categoryName":"女装/男装/内衣--女装/女士精品--羽绒服","categoryLevel":3,"darenId":263817957,"sellAmount7Days":0,"sellMoney7Days":0.0,"productNum7Days":0,"sellAmount30Days":6967,"sellMoney30Days":2982514.0,"productNum30Days":16,"viewCount7Days":0,"praiseCount7Days":0,"viewCount30Days":211248,"viewPraiseCount30Days":829725},{"id":"50008900\u0001263817957","date":"2017-11-22 00:00:00","categoryId":50008900,"categoryName":"女装/男装/内衣--女装/女士精品--棉衣/棉服","categoryLevel":3,"darenId":263817957,"sellAmount7Days":0,"sellMoney7Days":0.0,"productNum7Days":0,"sellAmount30Days":4616,"sellMoney30Days":1556649.0,"productNum30Days":8,"viewCount7Days":0,"praiseCount7Days":0,"viewCount30Days":160833,"viewPraiseCount30Days":764305},{"id":"50010850\u0001263817957","date":"2017-11-22 00:00:00","categoryId":50010850,"categoryName":"女装/男装/内衣--女装/女士精品--连衣裙","categoryLevel":3,"darenId":263817957,"sellAmount7Days":0,"sellMoney7Days":0.0,"productNum7Days":0,"sellAmount30Days":635,"sellMoney30Days":12076.0,"productNum30Days":5,"viewCount7Days":0,"praiseCount7Days":0,"viewCount30Days":101112,"viewPraiseCount30Days":110642},{"id":"50011993\u0001263817957","date":"2017-11-22 00:00:00","categoryId":50011993,"categoryName":"美妆/洗护/医疗--美容护肤/美体/精油--面部护理套装","categoryLevel":3,"darenId":263817957,"sellAmount7Days":0,"sellMoney7Days":0.0,"productNum7Days":0,"sellAmount30Days":761,"sellMoney30Days":166659.0,"productNum30Days":1,"viewCount7Days":0,"praiseCount7Days":0,"viewCount30Days":75305,"viewPraiseCount30Days":606574},{"id":"50012010\u0001263817957","date":"2017-11-22 00:00:00","categoryId":50012010,"categoryName":"鞋靴/箱包/配件--箱包皮具/热销女包/男包--女士包袋","categoryLevel":3,"darenId":263817957,"sellAmount7Days":0,"sellMoney7Days":0.0,"productNum7Days":0,"sellAmount30Days":92,"sellMoney30Days":39021.0,"productNum30Days":4,"viewCount7Days":0,"praiseCount7Days":0,"viewCount30Days":161452,"viewPraiseCount30Days":883075},{"id":"50012028\u0001263817957","date":"2017-11-22 00:00:00","categoryId":50012028,"categoryName":"鞋靴/箱包/配件--女鞋--靴子","categoryLevel":3,"darenId":263817957,"sellAmount7Days":0,"sellMoney7Days":0.0,"productNum7Days":0,"sellAmount30Days":1523,"sellMoney30Days":287096.0,"productNum30Days":2,"viewCount7Days":0,"praiseCount7Days":0,"viewCount30Days":75305,"viewPraiseCount30Days":606574},{"id":"50013194\u0001263817957","date":"2017-11-22 00:00:00","categoryId":50013194,"categoryName":"女装/男装/内衣--女装/女士精品--毛呢外套","categoryLevel":3,"darenId":263817957,"sellAmount7Days":0,"sellMoney7Days":0.0,"productNum7Days":0,"sellAmount30Days":2983,"sellMoney30Days":847174.0,"productNum30Days":5,"viewCount7Days":0,"praiseCount7Days":0,"viewCount30Days":253155,"viewPraiseCount30Days":2020647}]};
    setTimeout(() => {

      this.vm.table.livers = res.data;

      this.vm.table.count = res.data.length;

    }, 100);
  }



}
